package edu.sias.question.constants;
// 学科问题索引模板
public class QuestionConstants {
    public static final String MAPPING_TEMPLATE =
            "{\n" +
            "  \"settings\": {\n" +
            "    \"number_of_shards\": 1,\n" +
            "    \"number_of_replicas\": 1\n" +
            "  },\n" +
            "  \"mappings\": {\n" +
            "    \"properties\": {\n" +
            "      \"id\": { \"type\": \"long\" },                   // 题目ID\n" +
            "      \"type\": { \"type\": \"keyword\" },              // 题型：单选、多选、简答\n" +
            "      \"content\": { \"type\": \"text\" },              // 题目内容\n" +
            "      \"options\": {                                // 选项（仅适用于选择题）\n" +
            "        \"type\": \"nested\",\n" +
            "        \"properties\": {\n" +
            "          \"option_id\": { \"type\": \"long\" },        // 选项ID\n" +
            "          \"content\": { \"type\": \"text\" }           // 选项内容\n" +
            "        }\n" +
            "      },\n" +
            "      \"correct_answers\": {                        // 正确答案\n" +
            "        \"type\": \"text\",\n" +
            "        \"fields\": {\n" +
            "          \"keyword\": {\n" +
            "            \"type\": \"keyword\",\n" +
            "            \"ignore_above\": 256\n" +
            "          }\n" +
            "        }\n" +
            "      },\n" +
            "      \"score\": { \"type\": \"float\" },               // 分值（可选）\n" +
            "      \"tags\": {                                   // 标签（如难度等级等，可选）\n" +
            "        \"type\": \"keyword\"\n" +
            "      }\n" +
            "    }\n" +
            "  }\n" +
            "}";

}